const state = {
    userInfo:{},   //用户信息
    status:false   //是否连接
}
  
const mutations = {
    setUserInfo(state,userInfo) {
        state.userInfo = userInfo
    },
    setStatus(state,status) {
        state.status = status
    },
}

const actions = {
    setUserInfo ({ commit },userInfo) {
        commit('setUserInfo',userInfo)
    },
    setStatus({ commit },status) {
        commit('setStatus',status)
    },
}

export default {
    state,
    mutations,
    actions
}